package com.pignest.hotel.definition;

import java.util.ArrayList;
import java.util.List;

/**开房类型*/
public enum OpenRoomType {

	DAY("天房"),
	HALFDAY("半天房"),
	HOURS("钟点房");
	private String displayName;
	OpenRoomType(String displayName){
		this.displayName =displayName;
	}
	public String getDisplayName() {
		return displayName;
	}
    public String getName(){
    	return name();
    }
	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}
	public static OpenRoomType valueof(String name) {
		try {
			return valueOf(name);
		} catch (Exception e) {
		}
		return null;
	}
	
	public boolean is(String name) {
		return name().equals(name);
	}
	public static String [][] getOpenRoomTypeNoIncludKey(String key)
	{
		OpenRoomType[] openRoomTypes =OpenRoomType.values();
		List<String[]> m = new ArrayList<String[]>();
		for(int i=0;i<openRoomTypes.length;i++)
		{
			if(!openRoomTypes[i].name().equals(key)){
				String[] a = new String[] {openRoomTypes[i].name(),openRoomTypes[i].displayName};
				m.add(a);
			}
		}
		return m.toArray(new String[2][openRoomTypes.length]);
	}
}
